@extends('admin.base.index')
@section('content')
<div class="block-area" id="tableStriped">
    <h3 class="block-title" style="color:yellow">商品分类one表主页</h3>
            <form action="" method="post" name="myform">
                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                <input type="hidden" name="_method" value="DELETE">
            </form>
            <div class="table-responsive overflow">
                <table class="tile table table-bordered table-striped">
                    <thead>
                        <tr>
                            @include('admin.classone.page')
                        </tr>
                        <tr>
                           <td align="center">分类oneid</td>
                           <td align="center">分类名称</td>
                           <td align="center">类id(=oneid)</td>
                           <td align="center">分类等级</td>
                           <td align="center">状态</td>
                           <td align="center">操作</td>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($one as $v)
                        <tr>
                            <td align="center">{{ $v->oneid }}</td>
                            <td align="center">{{ $v->classname }}</td>
                            <td align="center">{{ $v->cid }}</td>
                            <td align="center">{{ $v->level }}</td>
                            <td align="center">{{ $v->status==0?'置顶':'不置顶' }}</td>
                            <td align="center">
                                <a href="javascript:doDel({{ $v->oneid }})">
                                    <button class="btn-info">删除</button>
                                </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                <a href="/admin/classone/{{ $v->oneid }}/edit">
                                    <button class="btn-info">修改</button>
                                </a>
                             </td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
                {{ $one->appends($whereone)->links() }}
                <script type="text/javascript">
                            function doDel(id)
                            // alert(id);
                            {
                                if(confirm('确定要删除吗???')){
                                    var form = document.myform;
                                    form.action = '/admin/classone/'+id;
                                    form.submit();
                                }
                            }
                </script>
            </div>
</div>
<!-- ************************************商品分类单行表管理*************************************** -->
<div class="col-md-12">
<div  class="col-md-6">
    <h3 class="block-title" style="color:green">商品分类单行(odd)表管理</h3>
            <form action="" method="post" name="oddform">
                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                <input type="hidden" name="_method" value="DELETE">
            </form>
            <div class="table-responsive overflow">
                <table class="tile table table-bordered table-striped">
                    <thead>
                        <tr>
                           <td align="center">分类oddid</td>
                           <td align="center">分类名称</td>
                           <td align="center">类id(=oddid)</td>
                           <td align="center">分类等级</td>
                           <td align="center">操作</td>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($odd as $v)
                        <tr>
                            <td align="center">{{ $v->oddid }}</td>
                            <td align="center">{{ $v->classname }}</td>
                            <td align="center">{{ $v->cid }}</td>
                            <td align="center">{{ $v->level }}</td>
                            <td align="center">
                                <a href="javascript:doOdd({{ $v->oddid }})">
                                    <button class="btn-info">删除</button>
                                </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                <a href="/admin/classodd/{{ $v->oddid }}/edit">
                                    <button class="btn-info">修改</button>
                                </a>
                             </td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
                <script type="text/javascript">
                    function doOdd(id)
                    {
                        if(confirm('确定要删除吗???')){
                            var oddform = document.oddform;
                            oddform.action = '/admin/classodd/'+id;
                            oddform.submit();
                        }
                    }
                </script>
            </div>
</div>
<!-- ***************************************商品分类双行表管理************************************************ -->
<div  class="col-md-6">
    <h3 class="block-title" style="color:blue">商品分类双行(even)表管理</h3>
        <form action="" method="post" name="evenform">
            <input type="hidden" name="_token" value="{{ csrf_token() }}">
            <input type="hidden" name="_method" value="DELETE">
            </form>
            <div class="table-responsive overflow">
               <table class="tile table table-bordered table-striped">
                    <thead>
                        <tr>
                           <td align="center">分类evenid</td>
                           <td align="center">分类名称</td>
                           <td align="center">类id(=evenid)</td>
                           <td align="center">分类等级</td>
                           <td align="center">操作</td>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($even as $v)
                        <tr>
                            <td align="center">{{ $v->evenid }}</td>
                            <td align="center">{{ $v->classname }}</td>
                            <td align="center">{{ $v->cid }}</td>
                            <td align="center">{{ $v->level }}</td>
                            <td align="center">
                                <a href="javascript:doEven({{ $v->evenid }})">
                                    <button class="btn-info">删除</button>
                                </a>&nbsp;&nbsp;|&nbsp;&nbsp;
                                <a href="/admin/classeven/{{ $v->evenid }}/edit">
                                    <button class="btn-info">修改</button>
                                </a>
                             </td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
                <script type="text/javascript">
                    function doEven(id)
                    {
                        if(confirm('确定要删除吗???')){
                            var evenform = document.evenform;
                            evenform.action = '/admin/classeven/'+id;
                            evenform.submit();
                        }
                    }
                </script>
            </div>
</div>
</div>
@stop
